package ioc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component("bar")
public class Bar {

	private Waiter wtr;
	
	
	@Autowired
	public Bar(@Qualifier("wt")Waiter wtr) {
		super();
		System.out.println("Bar(wtr)");
		this.wtr = wtr;
	}


	public Bar() {
		System.out.println("Bar()");
	}


	@Override
	public String toString() {
		return "Bar [wtr=" + wtr + "]";
	}

	
	
	
	
}





















